package com.health.db.service.order.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.health.db.dao.order.IEPayCashPaymentDao;
import com.health.db.model.EPayCashPayment;
import com.health.db.model.EPayCashPaymentExample;
import com.health.db.service.order.IEPayCashPaymentService;
import com.health.mapp.utils.DateUtils;

@Component("ePayCashPaymentService")
public class EPayCashPaymentServiceImpl implements IEPayCashPaymentService {
	
	@Autowired
	private IEPayCashPaymentDao ePayCashPaymentDao;

	@Override
	public int insert(EPayCashPayment record) {
		// TODO Auto-generated method stub
		return ePayCashPaymentDao.insert(record);
	}


	@Override
	public List<EPayCashPayment> selectByOrderId(String recid) {
		// TODO Auto-generated method stub
		return ePayCashPaymentDao.selectByOrderId(recid);
	}
	



	public IEPayCashPaymentDao getePayCashPaymentDao() {
		return ePayCashPaymentDao;
	}

	public void setePayCashPaymentDao(IEPayCashPaymentDao ePayCashPaymentDao) {
		this.ePayCashPaymentDao = ePayCashPaymentDao;
	}

	@Override
	public int updateByPayCashIDSelective(EPayCashPayment updateRecord) {
		
		int result = -1;
		Date now=DateUtils.now();
		updateRecord.setUpdateDate(now);
		// TODO Auto-generated method stub
		result= ePayCashPaymentDao.updateByPayCashIDSelective(updateRecord);
		
		return result;
	}
	

	@Override
	public List<EPayCashPayment> selectByExample(EPayCashPaymentExample example) {
		// TODO Auto-generated method stub
		return ePayCashPaymentDao.selectByExample(example);
	}

}
